package com.kedou.sdk.params;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;
import com.kedou.sdk.params.bean.Goods;

/**
 * Created by Administrator on 2017/6/9 0009.
 */

public class PlatformCoinRequestParams extends BaseRequestParams implements Parcelable {

    private static final String SERVICE = "ptb/index";
    private String uid;



    /**
     * 角色ID
     */
    @SerializedName("role_id")
    private String roleId;

    private String role_name;
    private int gain;

    private int server_id;

    /**
     * 区服名称
     */
    @SerializedName("server_name")
    private String serverName;

    private String device = "Android";
    private String product_id;





    public PlatformCoinRequestParams( Goods goods) {
        this.product_id = goods.getGoodsId();

        this.roleId = goods.getRoleId();
        this.role_name = goods.getRoleName();

        this.gain = goods.getGainCount();
        this.server_id = goods.getServerId();
        this.serverName = goods.getServerName();
        this.uid = uid;

    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }




    public String getRole_name() {
        return role_name;
    }

    public void setRole_name(String role_name) {
        this.role_name = role_name;
    }

    public int getGain() {
        return gain;
    }

    public void setGain(int gain) {
        this.gain = gain;
    }


    public int getServer_id() {
        return server_id;
    }

    public void setServer_id(int server_id) {
        this.server_id = server_id;
    }

    public String getDevice() {
        return device;
    }

    public void setDevice(String device) {
        this.device = device;
    }

    public String getProduct_id() {
        return product_id;
    }

    public void setProduct_id(String product_id) {
        this.product_id = product_id;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getServerName() {
        return serverName;
    }

    public void setServerName(String serverName) {
        this.serverName = serverName;
    }



    @Override
    public String getServiceString() {
        return SERVICE;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeString(this.uid);

        dest.writeString(this.roleId);
        dest.writeString(this.role_name);
        dest.writeInt(this.gain);

        dest.writeInt(this.server_id);
        dest.writeString(this.serverName);
        dest.writeString(this.device);
        dest.writeString(this.product_id);
    }

    protected PlatformCoinRequestParams(Parcel in) {
        super(in);
        this.uid = in.readString();

        this.roleId = in.readString();
        this.role_name = in.readString();
        this.gain = in.readInt();

        this.server_id = in.readInt();
        this.serverName = in.readString();
        this.device = in.readString();
        this.product_id = in.readString();
    }

    public static final Creator<PlatformCoinRequestParams> CREATOR = new Creator<PlatformCoinRequestParams>() {
        @Override
        public PlatformCoinRequestParams createFromParcel(Parcel source) {
            return new PlatformCoinRequestParams(source);
        }

        @Override
        public PlatformCoinRequestParams[] newArray(int size) {
            return new PlatformCoinRequestParams[size];
        }
    };
}
